﻿namespace Core.MemCache
{
    public class List<T> : IList
    {
        private readonly System.Collections.Generic.List<T> container = new();

        public int Count => container.Count;

        public void Add(T value)
        {
            container.Add(value);
        }

        public void Remove(T value)
        {
            container.Remove(value);
        }

        public void Set(T value)
        {
            container.Clear();
            container.Add(value);
        }

        public bool Contains(T value)
        {
            return container.Contains(value);
        }

        public void Dispose()
        {
            container.Clear();
        }
    }
}
